fix: fill in some documented gaps with rules that exist#1
Conversation
241b503 to
00b0209
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates oxlint-config-universe to close documented gaps by enabling additional oxlint rules (including TypeScript- and type-aware rules) and aligning the README and test snapshots with the updated rule coverage.
Changes:
- Enable additional TypeScript rules in
shared/typescript.js(e.g., TS variants ofno-redeclare,no-unused-vars, etc.). - Add
typescript/no-implied-evalto the type-aware TypeScript preset and addno-new-native-nonconstructorto core rules. - Update README rule-coverage documentation and refresh Jest snapshots to match the new lint output.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/typescript.js | Enables several TypeScript-prefixed equivalents of existing core rules. |
| shared/typescript-analysis.js | Adds type-aware typescript/no-implied-eval coverage. |
| shared/core.js | Adds core rule no-new-native-nonconstructor. |
| README.md | Updates the “coverage gaps” documentation to reflect newly enabled rules/presets. |
| tests/snapshots/default-test.js.snap | Updates expected lint output for default preset after rule changes. |
| tests/snapshots/node-test.js.snap | Updates expected lint output for node preset after rule changes. |
| tests/snapshots/web-test.js.snap | Updates expected lint output for web preset after rule changes. |
| tests/snapshots/native-test.js.snap | Updates expected lint output for native preset after rule changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'typescript/no-dupe-class-members': 'warn', | ||
| 'typescript/no-redeclare': 'warn', | ||
| 'typescript/no-unused-expressions': ['warn', { allowShortCircuit: true, enforceForJSX: true }], | ||
| 'typescript/no-unused-vars': [ | ||
| 'warn', |
There was a problem hiding this comment.
typescript/no-unused-vars is enabled without any options, which appears to drop the existing underscore convention from the core no-unused-vars config (e.g., caught errors prefixed with _ are no longer ignored, and the snapshots now show a warning for catch (_ignored)). Consider configuring typescript/no-unused-vars with the same options as the core rule (at least caughtErrors: 'all' + caughtErrorsIgnorePattern: '^_', and any other repo-wide settings) to keep behavior consistent across JS/TS.
| ## Rules not covered by oxlint | ||
|
|
||
| The following rules from `eslint-config-universe` do not have oxlint equivalents. If you need them, you'll need to keep ESLint running alongside oxlint for these specific rules, or accept the gap. | ||
| The following rules from `eslint-config-universe` do not have `oxlint-config-universe` coverage. If you need them, you'll need to keep ESLint running alongside oxlint for these specific rules, or accept the gap. | ||
|
|
||
| ### Core ESLint rules | ||
|
|
||
| | Rule | Notes | | ||
| | ----------------- | ---------------------------------------------------------------- | | ||
| | `no-dupe-args` | Not implemented in oxlint | | ||
| | `no-implied-eval` | Only available as `typescript/no-implied-eval`, not for plain JS | | ||
| | `no-new-symbol` | oxlint has `no-new-native-nonconstructor` as a successor | | ||
| | `no-octal` | Not implemented | | ||
| | `no-octal-escape` | Not implemented | | ||
| | Rule | Notes | | ||
| | ----------------- | --------------------------------------------------------------------------------------- | | ||
| | `no-dupe-args` | Not implemented in oxlint | | ||
| | `no-implied-eval` | Only available with type-aware, present in `oxlint-config-universe/typescript-analysis` | | ||
| | `no-octal` | Not implemented | | ||
| | `no-octal-escape` | Not implemented | |
There was a problem hiding this comment.
This section is titled “Rules not covered by oxlint / oxlint-config-universe coverage”, but no-implied-eval is now listed as available via oxlint-config-universe/typescript-analysis. That reads as contradictory for users skimming this list. Consider moving no-implied-eval out of the “not covered” table (or adjusting the heading/notes to clarify it’s covered, but only when opting into the type-aware preset).
00b0209 to
bce1cbe
Compare
Some of the gaps documented in README do have existing rules. This updates the readme and the configs accordingly.